package com.smart.campus.controller;

import com.smart.campus.dto.SysUser;
import com.smart.campus.interfaces.ShSchoolTeacherApi;
import com.smart.campus.pojo.PagedResponse;
import com.smart.campus.service.ShSchoolTeacherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @BelongsProject: smart-campus
 * @BelongsPackage: com.smart.campus.controller
 * @Author: Y S Z
 * @CreateTime: 2024-09-26  15:39
 * @Description: TODO
 * @Version: 1.0
 */
@RestController
public class ShSchoolTeacherController implements ShSchoolTeacherApi {
    @Autowired
    private ShSchoolTeacherService shSchoolTeacherService;


    @Override
    public List<SysUser> findShSchoolTeacherList(SysUser sysUser) {
        return shSchoolTeacherService.findSchoolTeacherList(sysUser);
    }

    @Override
    public PagedResponse<SysUser> pageSchoolTeacher(SysUser sysUser, Integer pageNum, Integer pageSize) {
        return shSchoolTeacherService.pageSchoolTeacher(sysUser, pageNum, pageSize);
    }

    @Override
    public void addSchoolTeacher(SysUser sysUser) {
        shSchoolTeacherService.addSchoolTeacher(sysUser);
    }

    @Override
    public void delSchoolTeacher(Long userId) {
        shSchoolTeacherService.delSchoolTeacher(userId);
    }

    @Override
    public SysUser findSchoolTeacherId(Long userId) {
        return shSchoolTeacherService.findSchoolTeacherId(userId);
    }

    @Override
    public void updSchoolTeacher(SysUser sysUser) {
        shSchoolTeacherService.updSchoolTeacher(sysUser);
    }
}
